package cn.jboa.action;

import java.util.Map;

import cn.jboa.common.Constants;
import cn.jboa.entity.SysEmployee;
import cn.jboa.util.PaginationSupport;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class BaseAction<T> extends ActionSupport {
	protected Integer pageNo=1;//当前页
	protected Integer pageSize=5;//每页条数
	protected PaginationSupport<T> pageSupport;


	protected Map<String, Object> getSession() {
		ActionContext actionContext = ActionContext.getContext();
		return actionContext.getSession();
	}

	protected SysEmployee getLoginEmployee(){
		return  (SysEmployee) this.getSession().get(Constants.AUTH_EMPLOYEE);
	}

	public Integer getPageNo() {
		return pageNo;
	}

	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public PaginationSupport<T> getPageSupport() {
		return pageSupport;
	}

	public void setPageSupport(PaginationSupport<T> pageSupport) {
		this.pageSupport = pageSupport;
	}
}
